Component({
  properties: {
    layout: {
      type: Array,
      value: []
    },
    refreshing: {
      type: Boolean,
      value: false
    }
  },
  data: {},
  methods: {
    loadMore(){
      this.triggerEvent("loadMore")
    },
    finishRefresh() {
      this.setData({
        refreshing: false,
      })
    },
    onRefresh(e) {
      this.setData({
        refreshing: true,
      })
      this.triggerEvent("refresh")
      setTimeout(() => this.finishRefresh(), 4000);
    }
  }
})
